
@Controller
public class HospitalizationFormController {
    @Autowired
    public HospitalizationFormService service;


    @RequestMapping(value = "/addH", method = RequestMethod.POST)
    public String addInpatientWard(@Valid HospitalizationForm hospitalizationForm) {
        String hospitalname = hospitalizationForm.getHospitalname();
        String hsex = hospitalizationForm.getHsex();
        int hage = hospitalizationForm.getHage();
        String hphone = hospitalizationForms.getHphone();
        String haddress = hospitalizationForm.getHaddress();
        String hhospital = hospitalizationForm.getHhospital();
        String hcategory = hospitalizationForm.getHcategory();
        String hdate = hospitalizationForm.getHdate();
        service.insertHospitalizationForm(hospitalname, hsex, hage, hphone, haddress, hhospital, hcategory, hdate);
        return "addHos";
    }
}